package com.mall.sun.repository.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.mall.sun.model.dto.BaseChartDTO;
import com.mall.sun.model.dto.GoodAgentDTO;
import com.mall.sun.model.dto.GoodDTO;
import com.mall.sun.model.dto.GoodSupplierDTO;
import com.mall.sun.model.po.Goods;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.mall.sun.model.po.Goodscategory;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Tansty
 * @since 2021-11-30
 */
public interface GoodsMapper extends BaseMapper<Goods> {
    GoodDTO[] getAllGood(Page<GoodDTO> page);
    Long countGoods();
    Goodscategory[] getAllTypes();
    GoodAgentDTO[] getGoodsAgent(Page<GoodAgentDTO> page);
    GoodSupplierDTO[] getGoodsSuppier(Page<GoodSupplierDTO> page);
    int updateGood(GoodDTO goodDTO);
    int updateSupplier(GoodSupplierDTO goodSupplierDTO);
    GoodDTO[] search(String gname);
    BaseChartDTO[] getDayExp();
    BaseChartDTO[] getExpGood();
}
